﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CoreProject.IRepository;
using CoreProject.Model;
using Microsoft.EntityFrameworkCore;

namespace CoreProject.Repository
{
    public class GoodsSpecRepository : BaseRepository<GoodsSpecKey>, IGoodsSpecRepository
    {
        private readonly EFDbContext _context;

        public GoodsSpecRepository(EFDbContext context) : base(context)
        {
            this._context = context;
        }

        public async Task<List<GoodsSpecKey>> GetSpecKeys()
        {
            return await _context.GoodsSpecKeys.Include(n => n.GoodsSpecValues).ToListAsync();
        }
    }
}
